package frontend_package;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Observable;

import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
/**
 * Class for Admin panel GUI and listeners
 * 
 * @author Aidana
 * @author Eva
 */
public class AdminPanel extends Observable {
	/** Admin panel */
	private JPanel adminpanel;
	/** refresh button */
	private JButton refreshbutton;

	/**
	 * Contructor of Admin Panel class
	 * 
	 * @author Syrym
	 */
	public AdminPanel() {
		adminpanel = new JPanel();
		adminpanel.setLayout(new BorderLayout());

		refreshbutton = new JButton("REFRESH");

		adminpanel.add(refreshbutton, BorderLayout.CENTER);

		refreshbutton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JOptionPane.showMessageDialog(null, "The Data is refreshed! ");
			}
		});
	}

	/**
	 * @author Syrym
	 * @return adminPanel
	 */
	public JPanel getPanel() {
		return adminpanel;
	}
}